<!-- Content -->
<div id="content">

    <!-- Content wrapper -->
    <div class="wrapper">

        <!-- Breadcrumbs line -->
        <div class="crumbs">
            <ul id="breadcrumbs" class="breadcrumb"> 
                <li><a href="<?= base_url() ?>xpanel">XPANEL</a></li>
                <li class="active"><a href="<?= base_url() ?>" title="">Inicio</a></li>
            </ul>

        </div>
        <!-- /breadcrumbs line -->

        <!-- Page header -->
        <div class="page-header">
            <div class="page-title">
                <h5>XPANEL</h5>
            </div>

        </div>
        <!-- /page header -->

        <!-- Form related buttons -->
        <div class="widget">
            <div class="navbar"><div class="navbar-inner"><h6>Download as Excel</h6></div></div>

            <div class="well">

                <div class="control-group">
                    <div class="controls">
                        <?=  form_open('reportes/excel','id="excelhk"') ?>
                        <input type="hidden" value="<?=$finicial?>" name="finicial"  />
                        <input type="hidden" value="<?=$ffinal?>" name="ffinal" />
                        <input type="hidden" value="<?=$ta_tipo_aspi_id?>" name="ta_tipo_aspi_id" />
                        <button type="submit" class="btn btn-primary" id="loading" data-loading-text="Generando...">Descargar</button>
                        <?= form_close() ?>
                    </div>
                </div>

            </div>
        </div>
        <!-- /form related buttons -->

        <!-- Table condensed -->
        <div class="widget">
            <div class="navbar"><div class="navbar-inner"><h6>@hk</h6></div></div>
            <div class="table-overflow">
                <table class="table table-condensed" >
                    <thead>
                        <tr style="font-size: 7px;">
                            <th>Matricula</th>
                            <th>Pregunta</th> 
                            <th>PP</th>
                            <?php foreach ($xUnidades as $t) { ?>
                                <th><?= $t->sucursal ?></th>                        
                            <?php } ?>
                        </tr>
                    </thead>
                    <tbody>
                        <?php foreach ($iBull as $i) { ?>
                            <tr>
                                <td><?= $i['matricula'] ?></td>
                                <td style="font-size: 7px;"><?= $i['p_pregunta'] ?></td>
                                <td><?= $i['p_pp'] ?></td>
                                <?php foreach ($xUnidades as $t) { ?>
                                    <td><?= $i[str_replace(' ', '_', strtolower($t->sucursal))] ?></td>   
                                <?php } ?>
                            </tr>
                        <?php } ?>
                    </tbody>
                </table>
            </div>
        </div>
        <!-- /table condensed -->


    </div>
    <!-- /content wrapper -->

</div>
<!-- /content -->